package com.rajaev.dtu.tractor.domain.repository.mysql;

import com.rajaev.dtu.tractor.domain.entity.BatteryElectricLog;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Repository
@Mapper
public interface BatteryElectricDao {

    Integer addBatteryElectricLog(BatteryElectricLog batteryElectricLog);


    List<BatteryElectricLog> queryListByVin(String vin);

    BatteryElectricLog queryDischargingByVin(String vin);

    BatteryElectricLog queryChargingByVin(String vin);

    List<BatteryElectricLog> queryDischargingLog();

    List<BatteryElectricLog> queryChargingLog();

    BatteryElectricLog selectNotOveredLogByVin(String vin);

    Integer updateBatteryElectricLog(BatteryElectricLog batteryElectricLog);

    List<BatteryElectricLog> selectElectricityByVinAndDate(@Param("vin") String vin,
                                                           @Param("startTime")  Date startTime,
                                                           @Param("endTime")  Date endTime);

}
